import { injectable } from "inversify";
import { BaseService } from "../base_class/BaseService";
import type { IGreetingService } from "../interface/IGreetingService";
import type { ILogService } from "../interface/ILogService";
import { myContainer } from "../inversify/inversify.config";
import { LogService } from "./LogService";

@injectable()
export class GreetingService extends BaseService implements IGreetingService {
  protected logService: ILogService;
  constructor() {
    super();
    this.logService = myContainer.get(LogService);
  }
  doGreening(s: string): string {
    this.logService.log(`Hello: ${s}`);
    return `Hello ${s}`;
  }
}
